const express = require('express')
const UserController = require('../router_controller/user')
const router = express.Router()


// 1. 导入 @escook/express-joi
const expressJoi = require('@escook/express-joi')
// 导入 校验规则对象
const { Register_schema, Login_schema } = require('../schema/user')




router.post('/register', expressJoi(Register_schema), UserController.register)
router.post('/login', expressJoi(Login_schema), UserController.login)


module.exports = router